package com.maixy.studyonlineapi.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @ClassName ActivityTypeEnum
 * @Description TODO
 * @Date 2021/1/2 20:45
 * @Author maixy
 */
@AllArgsConstructor
@Getter
public enum ActivityTypeEnum {
    CLIENT(1, "client","前端开发"),
    SERVICE(2, "service","后端开发"),
    MOBILE(3, "mobile", "移动开发"),
    NEW(4,"new","前沿技术"),
    DEVOPS(5,"devops","运维技术"),
    TEST(6,"devops","测试技术"),
    OTHER(7,"other","其他技术");

    private final Integer id;
    private final String code;
    private final String desc;

    public static ActivityTypeEnum getById(Integer id) {
        for (ActivityTypeEnum typeEnum : values()) {
            if (typeEnum.getId().equals(id)) {
                return typeEnum;
            }
        }
        return null;
    }

}
